    <div id="form">
    <?php echo form_open_multipart(base_url().'admin/admin_con/edit_news/'.$id)?>
    <table style="border: 1px solid brown;padding-left: 20px" align="center" width="50%">
        <tr>
            <td align="center"><h1>BUAT BERITA BARU</h1></td>
        </tr>
        <tr>
            <td align="center">
                <?php
                    echo validation_errors();
                ?>
            </td>
        </tr>
        <tr>
            <td width="50%" align="left">Judul*: </td>
        </tr>

        <tr>
            <td width="50%" align="left">
                <?php
                    if(isset($news))
                        echo form_input('judul',$news['JUDUL']);
                    else
                        echo form_input('judul');                    
                ?>
            </td>
        </tr>
        <tr>
            <td width="50%" align="left">Jenis*: </td>
        </tr>

        <tr>
            <td width="50%" align="left">
                <?php
                    $list['BERITA'] = 'Berita';
                    $list['CERITA'] = 'Cerita';
                    $list['TUTORIAL'] = 'Tutorial';
                    if(isset($news))
                        echo form_dropdown('jenis',$list, $news['JENIS']);
                    else
                        echo form_dropdown('jenis',$list);                    
                ?>
            </td>
        </tr>
        <tr>
            <td width="50%" align="left">Gambar*: </td>
        </tr>

        <tr>
            <td width="50%" align="left">
                <?php
                    if(isset($news))
                        echo '<input type="file" name="userfile" value="'.$news['GAMBAR'].'" size="20" />
                            ';
                    else
                        echo '<input type="file" name="userfile" size="20" />
                            ';
                ?>
                    
            </td>
        </tr>
        <tr>
            <td align="left">
                Isi* :
            </td>
        </tr>
        <tr>
            <td align="left">
                <?php
                    $data = array(
                      'name'        => 'isi',
                      'id'          => 'isi',
                      'rows'        => '80',
                      'cols'        => '80',
                      'class'       => 'cleditor',  
                    );
                    if(isset($news))
                        $data['value'] = $news['ISI'];
                    echo form_textarea($data);
                ?>
                
            </td>
        </tr>
        <tr>
            <td align="left">
                <?php
                    echo form_submit('submit','Submit');
                    echo '&nbsp';
                    echo form_reset('reset','Reset');
                    echo form_hidden('id', $id);
                ?>
            </td>
        </tr>
    </table>
<?php echo form_close()?> 
    </div>
